package com.hengby.hengcrud.modular.job.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

@Setter
@Getter
@TableName(value = "T_JOB_LOG")
public class JobLog extends Model<JobLog> {

	private static final long serialVersionUID = -7114915445674333148L;

	public static final String SEQ = "seq_job_log";

	@TableField(value = "LOG_ID")
	private Long logId;

	@TableField(value = "JOB_ID")
//	@ExportConfig("任务ID")
	private Long jobId;

	@TableField(value = "BEAN_NAME")
//	@ExportConfig(value = "Bean名称")
	private String beanName;

	@TableField(value = "METHOD_NAME")
//	@ExportConfig(value = "方法名称")
	private String methodName;

	@TableField(value = "PARAMS")
//	@ExportConfig(value = "参数")
	private String params;

	@TableField(value = "STATUS")
//	@ExportConfig(value = "状态", convert = "s:0=成功,1=失败")
	private String status;

	@TableField(value = "ERROR")
//	@ExportConfig(value = "异常信息")
	private String error;

	@TableField(value = "TIMES")
//	@ExportConfig(value = "耗时（毫秒）")
	private Long times;

	@TableField(value = "CREATE_TIME")
//	@ExportConfig(value = "创建时间", convert = "c:cc.mrbird.common.util.poi.convert.TimeConvert")
	private Date createTime;

	@Override
	protected Serializable pkVal() {
		return jobId;
	}
}